package cate.game.chat.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBChat;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "公共频道历史消息 の 请求")
public class ChatPublicHistoryReq implements MsgInput {
    @NoteField(value = "想要查询哪个频道的最近消息记录", detail = "枚举值见在线文档GDChat.Channel.XXX")
    public byte channel;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.sendNow(new ChatPublicHistoryResp(channel, cc.getRole()));
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBChat.PUBLIC_HISTORY_REQ;
    }
}
